package com.frank.oj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.frank.model.entity.contest.Contest;
import com.frank.oj.model.vo.ContestRegisterCountVO;
import com.frank.oj.model.vo.ContestVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author frank
 * @Date 2023/12/21
 */
@Mapper
public interface ContestMapper extends BaseMapper<Contest> {
    List<ContestVO> getWithinNext14DaysContest();

    List<ContestRegisterCountVO> getContestRegisterCount(@Param("cidList") List<Long> cidList);

    List<ContestVO> getContestList(@Param("page") Page<ContestVO> page, @Param("status") Integer status, @Param("type") Integer type, @Param("keyword") String keyword);

    ContestVO getContestInfoById(Long cid);
}
